/*
 * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The OpenAirInterface Software Alliance licenses this file to You under
 * the OAI Public License, Version 1.1  (the "License"); you may not use this
 * file except in compliance with the License. You may obtain a copy of the
 * License at
 *
 *      http://www.openairinterface.org/?page_id=698
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *-------------------------------------------------------------------------------
 * For more information about the OpenAirInterface (OAI) Software Alliance:
 *      contact@openairinterface.org
 */
/**
 * Nudm_SDM
 * Nudm Subscriber Data Management Service. � 2019, 3GPP Organizational Partners
 * (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
 *
 * The version of the OpenAPI document: 2.1.0.alpha-1
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator
 * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
 * the class manually.
 */

#include "SmfSelectionSubscriptionData.h"

namespace oai {
namespace udm {
namespace model {

SmfSelectionSubscriptionData::SmfSelectionSubscriptionData() {
  m_SupportedFeatures          = "";
  m_SupportedFeaturesIsSet     = false;
  m_SubscribedSnssaiInfosIsSet = false;
  m_SharedSnssaiInfosId        = "";
  m_SharedSnssaiInfosIdIsSet   = false;
}

SmfSelectionSubscriptionData::~SmfSelectionSubscriptionData() {}

void SmfSelectionSubscriptionData::validate() {
  // TODO: implement validation
}

void to_json(nlohmann::json& j, const SmfSelectionSubscriptionData& o) {
  j = nlohmann::json();
  if (o.supportedFeaturesIsSet())
    j["supportedFeatures"] = o.m_SupportedFeatures;
  if (o.subscribedSnssaiInfosIsSet())
    j["subscribedSnssaiInfos"] = o.m_SubscribedSnssaiInfos;
  if (o.sharedSnssaiInfosIdIsSet())
    j["sharedSnssaiInfosId"] = o.m_SharedSnssaiInfosId;
}

void from_json(const nlohmann::json& j, SmfSelectionSubscriptionData& o) {
  if (j.find("supportedFeatures") != j.end()) {
    j.at("supportedFeatures").get_to(o.m_SupportedFeatures);
    o.m_SupportedFeaturesIsSet = true;
  }
  if (j.find("subscribedSnssaiInfos") != j.end()) {
    j.at("subscribedSnssaiInfos").get_to(o.m_SubscribedSnssaiInfos);
    o.m_SubscribedSnssaiInfosIsSet = true;
  }
  if (j.find("sharedSnssaiInfosId") != j.end()) {
    j.at("sharedSnssaiInfosId").get_to(o.m_SharedSnssaiInfosId);
    o.m_SharedSnssaiInfosIdIsSet = true;
  }
}

std::string SmfSelectionSubscriptionData::getSupportedFeatures() const {
  return m_SupportedFeatures;
}
void SmfSelectionSubscriptionData::setSupportedFeatures(
    std::string const& value) {
  m_SupportedFeatures      = value;
  m_SupportedFeaturesIsSet = true;
}
bool SmfSelectionSubscriptionData::supportedFeaturesIsSet() const {
  return m_SupportedFeaturesIsSet;
}
void SmfSelectionSubscriptionData::unsetSupportedFeatures() {
  m_SupportedFeaturesIsSet = false;
}
std::map<std::string, SnssaiInfo>&
SmfSelectionSubscriptionData::getSubscribedSnssaiInfos() {
  return m_SubscribedSnssaiInfos;
}
bool SmfSelectionSubscriptionData::subscribedSnssaiInfosIsSet() const {
  return m_SubscribedSnssaiInfosIsSet;
}
void SmfSelectionSubscriptionData::unsetSubscribedSnssaiInfos() {
  m_SubscribedSnssaiInfosIsSet = false;
}
std::string SmfSelectionSubscriptionData::getSharedSnssaiInfosId() const {
  return m_SharedSnssaiInfosId;
}
void SmfSelectionSubscriptionData::setSharedSnssaiInfosId(
    std::string const& value) {
  m_SharedSnssaiInfosId      = value;
  m_SharedSnssaiInfosIdIsSet = true;
}
bool SmfSelectionSubscriptionData::sharedSnssaiInfosIdIsSet() const {
  return m_SharedSnssaiInfosIdIsSet;
}
void SmfSelectionSubscriptionData::unsetSharedSnssaiInfosId() {
  m_SharedSnssaiInfosIdIsSet = false;
}

}  // namespace model
}  // namespace udm
}  // namespace oai
